﻿@page "/Production/DictInfos"
@using BootstrapAdmin.DataAccess.Models
@using BootstrapAdmin.Web.ViewModels.Production

<AdminTable TItem="DictInfo" CustomerSearchModel="DictInfoSearchModel" SortString="Category, Name">
    <TableColumns>
        <TableColumn @bind-Field="context.Category" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.Name" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.Alias" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.Code" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
    </TableColumns>
    <CustomerSearchTemplate>
        @if (context is DictInfoSearchModel searchModel)
        {
            <div class="row g-3 form-inline">
                <div class="col-sm-6 col-md-6">
                    <BootstrapInput @bind-Value="searchModel.Category" ShowLabel="true" />
                </div>
                <div class="col-sm-6 col-md-6">
                    <BootstrapInput @bind-Value="searchModel.Name" ShowLabel="true" />
                </div>
                <div class="col-sm-6 col-md-6">
                    <BootstrapInput @bind-Value="searchModel.Alias" ShowLabel="true" />
                </div>
                <div class="col-sm-6 col-md-6">
                   <BootstrapInput @bind-Value="searchModel.Code" ShowLabel="true" />
                </div>
            </div>
        }
    </CustomerSearchTemplate>
</AdminTable>

@code {
    private DictInfoSearchModel DictInfoSearchModel = new();
}
